import React from 'react';
import { connect } from 'dva';
import { routerRedux } from 'dva/router';
import { List, Icon } from 'antd-mobile';
import content from '../../../common/contentCss/content.css';
import CustTitle from '../../../common/title/title';
import MyFollowList from './pages/myFollow';


const listItem = {"birthday":"1983-05-07 00:00:00","vipValidDate":"2017-10-28 14:52:23","serviceArea":"接待,证道,传福音,关怀","decissionTime":"1988-01-01 00:00:00","church":"广州天河堂","verified":2,"maskAvatar":"http://112.74.26.228:8000/876708082437197824/b1cdcb82-5c82-465e-9fc4-d39bdc3c0da8.png","avatar":"http://112.74.26.228:8000/876708082437197824/83d1112c-00fe-49ca-b634-d392717ec7e3.png","mediatorId":"912867046123110401","type":1,"vipLevel":2,"baptized":"1996-01-01 00:00:00","lastLoginTime":"2017-10-14 16:43:27","u_id":"123467","createTime":"2017-09-27 10:13:27","name":"高新领队招募","id":"912862718893228034","followerCount":0,"loveStatus":2}

const myFollowArr = [
  {name: '广州可圈点信息科技有限公司1', id: '11'},
  {name: '广州可圈点信息科技有限公司2', id: '22'},
  {name: '广州可圈点信息科技有限公司3', id: '33'},
  {name: '广州可圈点信息科技有限公司4', id: '44'},
  {name: '广州可圈点信息科技有限公司5', id: '55'}
];



function MyFollow({dispatch,loading,myFollow}) {

  const {data} = myFollow;
  const titleProps = {
    titleName:'我的关注',
    goBack(){
      history.go(-1);
    },
  };
  const MyFollowListProps = {
    myFollowArr:  typeof (data)=="undefined"?[]:data,
      goCompany(id) {
      dispatch(routerRedux.push({
        pathname: '/enterprise-information',
          query: {
              id,
          }
      }));
    }
  };

  const MarginHeight = () => <div style={{height: '0.6em', backgroundColor:'#F5F5F9'}}></div>;

  return(
    <div className={content.content}>
      <CustTitle {...titleProps}/>
      <div style={{
        marginTop: '2.8125em',
      }}>
      </div>

      <MyFollowList {...MyFollowListProps}/>



    </div>
  )
}

function mapStateToProps(state, ownProps) {
  return {
    myFollow:state.myFollow,
    myFollowArr:myFollowArr
  }
}

export default connect(mapStateToProps)(MyFollow);
